package patterns.actions.iterator.books;

import java.util.Vector;

public class AggregateImp implements Aggregate {

	private Vector vecotr = new Vector();

	@Override
	public void add(Object obj) {

		this.vecotr.add(obj);
	}

	@Override
	public IteratorCls createIterator() {
		return new IteratorImp(this);
	}

	public int size() {
		return this.vecotr.size();
	}

	public Object getElement(int index) {
		if (index < this.vecotr.size())
			return this.vecotr.get(index);
		return null;
	}

}
